1. Field of the Invention
The present invention generally relates to an image processing apparatus and a method thereof in which color image data are input and the color image data are stored by applying color control to the input color image data.
2. Description of the Related Art
Various technologies have been proposed for an image processing apparatus which processes color image data input from a digital still camera, a digital video camera, a scanner, and so on.
In Japanese Laid-Open Patent Application No. 2004-200902, an image processing apparatus which uses one of the technologies is disclosed. In the image processing apparatus, a color gamut which is a distribution range of colors of input color image data is detected from the input color image data, a color space which substantially includes the color gamut is determined, and the input color image data are converted into image data which are expressed by the determined color space by using a color space converting unit. With this, colors of an object which is taken are precisely reproduced by the converted image data. The image processing apparatus can store the input color image data in a manner so that the degradation of the color image data is as small as possible.
In addition, in Japanese Laid-Open Patent Application No. 2003-153014, another image processing apparatus which uses one of the technologies is disclosed. In the image processing apparatus, color manuscript image data (in an RGB color space) read by an image reading unit are temporarily stored, and when the color manuscript image data are transmitted, the color manuscript image data are converted into image data corresponding to the image processing ability of a destination image communication apparatus. The conversion is RGB to L*a*b or RGB to L*a*b to sRGB. In the image processing apparatus, the image degradation caused by color space conversion operation errors can be as small as possible by executing the conversion corresponding to the ability of the destination once at the time of transmission of the image data without executing the conversion at the time of storing the image data. The image processing apparatus can make the degradation of the color image data low by decreasing the number of conversion times of the color space.
As described above, various image processing apparatuses and methods thereof have been proposed in which the input color image data are encoded by making the degradation of image data low and the input image data are satisfactorily reproduced.
In the image processing apparatus of Japanese Laid-Open Patent Application No. 2004-200902, input image data are divided into plural image regions, and hue and colorfulness (saturation) of each image region in which the image data is divided are calculated, and a color gamut is detected by obtaining the maximum colorfulness in each calculated hue. Further, a color space determining unit determines a color space that substantially includes the color gamut detected by a color gamut detecting unit, and a color space converting unit converts the input image data into image data of the determined color space.
However, in Japanese Laid-Open Patent Application No. 2004-200902, in order to detect the color gamut, an xy chromaticity coordinate is obtained from the input image data, and after representative hue and colorfulness are obtained in each of the plural image regions, the maximum colorfulness is obtained in each hue. That is, double or triple calculations are needed to obtain the maximum colorfulness.
Further, the color space that substantially includes the color gamut is determined by the maximum colorfulness in each hue; however, an area ratio of a region that belongs to each hue to the entire area of the input image is not considered. Therefore, even in a case where a large color difference exists such as having high colorfulness in a small area, a color space having a one rank larger color gamut is selected. Consequently, the quantization becomes rough and the difference between the input image data and the converted image data becomes large.
In addition, the background of the image is an important element that determines the appearance of the image. However, in Japanese Laid-Open Patent Application No. 2004-200902, since the area is not considered when the color space is determined, a color space which does not include hue belonging to a nearly uniform background may be selected depending on a predetermined ratio of the area. Consequently, the appearance of the image may be greatly changed.